#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
main()
{
	int h1, m1;
	int h2, m2;
	scanf("%d %d", &h1, &m1);
	scanf("%d %d", h2, m2);

	int t1 = h1 * 60 + m1;
	int t2 = h2 * 60 + m2;

	int t = t1 - t2;
	printf("the differences is %dhours%dminitues", t / 60, t % 60);


}